package com.gx.smart.building.ui.warning

import android.content.Intent
import android.view.ViewGroup
import com.gx.smart.base.BaseMVVMActivityV3
import com.gx.smart.building.R
import com.gx.smart.building.databinding.ActivityWarningResultBinding
import com.gx.smart.building.ui.warning.viewmodel.WarningViewModel

class WarningResultActivity : BaseMVVMActivityV3<WarningViewModel>() {
    private lateinit var viewBinding: ActivityWarningResultBinding
    override fun onBindViewModel(): Class<WarningViewModel> = WarningViewModel::class.java

    override fun onBindLayout(): Int = R.layout.activity_warning_result

    override fun getToolbarTitle(): String = "任务完成"

    override fun initContentView(root: ViewGroup) {
        viewBinding = ActivityWarningResultBinding.inflate(layoutInflater, root, true)
        viewBinding.detail.setOnClickListener {
            finish()
        }
        viewBinding.list.setOnClickListener {
            val intent = Intent(this, WarningListActivity::class.java)
            intent.flags = Intent.FLAG_ACTIVITY_CLEAR_TOP
            startActivity(intent)
        }
    }


}